package com.kai.mapper;

import com.github.pagehelper.Page;
import com.kai.anno.AutoFill;
import com.kai.dto.CourierPickUpDTO;
import com.kai.dto.ExpressOrderQueryDTO;
import com.kai.entity.Comment;
import com.kai.enumeration.AutoFillEnum;
import com.kai.vo.ExpressOrderVO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface CourierMapper {


    Page<ExpressOrderVO> queryAllOrders(ExpressOrderQueryDTO expressOrderQueryDTO);

    @AutoFill(value = AutoFillEnum.UPDATE)
    void acceptOrder(CourierPickUpDTO courierPickUpDTO);

    Page<ExpressOrderVO> queryAllAcceptedOrders(ExpressOrderQueryDTO expressOrderQueryDTO);

    @AutoFill(value = AutoFillEnum.UPDATE)
    void pickUp(CourierPickUpDTO courierPickUpDTO);

    @AutoFill(value = AutoFillEnum.UPDATE)
    void deliver(CourierPickUpDTO courierPickUpDTO);

    Long getStatus(Long courierId);

    @AutoFill(value = AutoFillEnum.UPDATE)
    void comment(Comment comment);
}
